<template>
  <div id="app">
    <router-view/>
  </div>
</template>

<script>
export default {
  name: 'App',
  created() {
    if (this.$util.getQueryString('uniacid')) {
      localStorage.setItem('uniacid', this.$util.getQueryString('uniacid'))
    }

    if (!localStorage.getItem('uniacid')) {
      localStorage.setItem('uniacid', 0)
    }

    if (this.$util.getQueryString('encode')) {
      this.autoLogin(this.$util.getQueryString('encode'));
    }
  },
  methods: {
    // 自动登录
    autoLogin(token){
      let that = this;

      that.$api.post('/login/autologin', {
        token: token
      }).then((res) => {
        if (res.data) {
          that.$store.dispatch('user/setToken', res)
          that.$router.push({
            path: '/',
          })
        }
      })
    },
  }
}
</script>
<style lang="scss" scoped>
#app ::v-deep .el-dialog__wrapper {
  .el-dialog__body {
    padding: 0px;
  }
}


::v-deep .el-table--striped .el-table__body tr.el-table__row--striped td {
  background: #fff;
  border-bottom: 0px solid #dfe6ec;
}

::v-deep .el-table th.is-leaf, .el-table td {
  border-bottom: 0px solid #dfe6ec;
}


::v-deep .el-table td {

  border-bottom: none !important;

}

::v-deep .el-table th.is-leaf {

  border-bottom: none !important;

}

::v-deep .el-table__row > td {

  border: none;

}

::v-deep .el-table::before {

  height: 0;

}


::v-deep .el-table::before {
  left: 0;
  bottom: 0;
  width: 100%;
  height: 0px;
}

::v-deep .el-icon-edit:before {
  content: "";
}

::v-deep .image-uploader .el-upload {
  border: 1px dashed #d9d9d9;
  border-radius: 60px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  width: 100px;
  height: 100px;
}

::v-deep .image-list .image-wrap .imgStyle img {
  width: 100px;
  height: 100px;
  border: 1px solid #d9d9d9;
  border-radius: 60px;
}

::v-deep .image-item .image-wrap .imgStyle img {
  width: 100px;
  height: 100px;
  border: 1px solid #d9d9d9;
  border-radius: 60px;
}


::v-deep .image-item .image-wrap .icon-wrap {
  position: absolute;
  left: 0;
  border-radius: 60px;
  width: 102px;
  height: 102px;
  cursor: default;
  text-align: center;
  line-height: 100px;
  color: #fff;
  opacity: 0;
  font-size: 20px;
  background-color: rgba(0, 0, 0, 0.7);
  transition: opacity 0.3s;
}


::v-deep .image-list .image-wrap .icon-wrap {
  position: absolute;
  left: 0;
  border-radius: 60px;
  width: 102px;
  height: 102px;
  cursor: default;
  text-align: center;
  line-height: 100px;
  color: #fff;
  opacity: 0;
  font-size: 20px;
  background-color: rgba(0, 0, 0, 0.7);
  transition: opacity 0.3s;
}


::v-deep .el-image {
  position: relative;
  display: inline-block;
  overflow: hidden;
  border-radius: 60px;
}

::v-deep .el-input__inner {
  -webkit-appearance: none;
  background-color: #FFFFFF;
  background-image: none;
  border-radius: 50px;
  border: 1px solid #DCDFE6;
  box-sizing: border-box;
  color: #606266;
  display: inline-block;
  font-size: inherit;
  height: 40px;
  line-height: 40px;
  outline: none;
  padding: 0 15px;
  transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
  width: 100%;
}


::v-deep .el-tabs__nav-wrap::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background-color: #ffffff;
  z-index: 1;
}


::v-deep .el-tabs__header {
  padding: 10px;
  position: relative;
  margin: 0 0 15px;
}


</style>
